package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.example.entity.Task;


import java.util.List;

public interface TaskMapper extends BaseMapper<Task> {
    @Select("SELECT * FROM task WHERE projectName = #{projectName}")
    List<Task> selectTask(@Param("projectName") String projectName);
    @Update("UPDATE task SET completed = #{completed} WHERE id = #{taskId}")
    void updateTaskStatus(@Param("completed") Boolean completed,@Param("taskId") Integer taskId);
}
